<!--// header //--> 
{include="../public/header"}
<!--主体内容-->
<!--当前操作-->
<div style="margin-left:65px; margin-right:65px; width:auto">
    <div class="row-fluid">
        <div class="span12">
            <h2 style="margin:12px; color:#41516a"><a href="/Student/index">学生档案管理</a></h2>
        </div>
    </div>		
    <style>
        .the-legend {
            border-style: none;
            border-width: 0;
            font-size: 14px;
            line-height: 20px;
            margin-bottom: 0;
        }
        .the-fieldset {
            border: 2px groove threedface #444;
            -webkit-box-shadow:  0px 0px 0px 0px #000;
            box-shadow:  0px 0px 0px 0px #000;
        }
    </style>
    <!--搜索区域-->
    <form class="form-search" method="post" action="/Student/index">
        <input type="text" class="input-medium search-query" name="searchfor" placeholder="支持模糊搜索" /> 
        <button type="submit" class="btn">Search</button>
    </form>
    <!--搜索区域-->
    <!--当前操作-->
    <div class="row-fluid">
        <div class="span12">
            <div class="row-fluid">
                <!--tab-->
                <div class="tabbable">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#1" data-toggle="tab"><font color="orange">学生档案</font></a></li>
                        <li><a href="#2" data-toggle="tab">学生建档</a></li>        
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="1">
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
<!--                                        <th>ID</th>-->
                                        <th>状态</th>
                                        <th>姓名</th>
                                        <th>性别</th>
                                        <th>课程</th>
                                        <th>班级</th>
                                        <th>报名时间</th>
                                        <th>实际缴费</th>
<!--                                        <th>爸爸</th>-->
                                        <th>爸爸号码</th>
<!--                                        <th>妈妈</th>-->
                                        <th>妈妈号码</th>
                                        <th>所在学校</th>
                                        <th>年龄</th>
<!--                                        <th>渠道</th>-->
                                        <th>管理</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {loop="students"}
                                    <tr>
<!--                                        <td>{$value.id}</td>-->
                                        <td>{if condition="$value.status == 0"}在读{elseif condition="$value.status == 1"}结业{elseif condition="$value.status == 2"}退费{elseif condition="$value.status == 3"}休学{/if}</td>
                                        <td>{$value.uName}</td>
                                        <td>{if condition="$value.uSex == 1"}男{elseif condition="$value.uSex == 2"}女{/if}</td>
                                        <td>{$value.cId}</td>
                                        <!--                                        <td>{$coursearr[$value.cId]}</td>-->
                                        <td>{$value.gid}</td>
<!--                                        <td><a href="/Student/grade/id/{$value.gid}" alt="查看班级学生" title="查看班级学生">{$gradearr[$value.gid]}</a></td>-->
                                        <td>{function="date('Y-m-d',$value.createat)"}</td>
                                        <td>{$value.uPayfee}</td>
<!--                                        <td>{$value.uFather}</td>-->
                                        <td>{$value.uFathertel}</td>
<!--                                        <td>{$value.uMother}</td>-->
                                        <td>{$value.uMothertel}</td>
                                        <td>{$value.uSchool}</td>
                                        <td>{$value.uAge}</td>
<!--                                        <td>{$value.uFrom}</td>-->
                                        <td><a href="/Student/edit/id/{$value.id}" alt="编辑" title="编辑"><i class="icon-edit"></i></a><a href="/Student/destory/id/{$value.id}" alt="删除" title="删除" onclick="return confirm('确定要删除此学生档案!')"><i class="icon-trash"></i></a></td>
                                    </tr>
                                    {/loop}
                                    <tr>
                                        <td colspan="12">
                                            <a href="/Student/index/p/{$pager['page']-1}">上一页</a>
                                            <a href="/Student/index/p/{$pager['page']+1}">下一页</a>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="tab-pane" id="2">
                            <form name="frm" method="post" action="/Student/create" onsubmit="return validate();">      
                                <div class = 'form-horizontal well'>
                                    <fieldset class="well the-fieldset">
                                        <legend class="the-legend">基本信息</legend>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>姓名
                                                    <input type="text" name="uName" id="uName" /></label>
                                            </div>
                                            <div class="span4">
                                                <label>课程
                                                    <select name="cId" id="cId">
                                                        <option value='0'>--选择课程--</option>
                                                        {loop="course"}
                                                        <option value="{$value.id}">{$value.cName}</option>
                                                        {/loop}
                                                    </select>
                                                </label>
                                            </div>
                                            <div class="span4">
                                                <label>班级
                                                    <select name="gId" id="gId">
                                                        <option value='0'>--选择班级--</option>
                                                        {loop="grade"}
                                                        <option value="{$value.id}">{$value.gname}</option>
                                                        {/loop}
                                                    </select>
                                                </label>
                                            </div>
                                            <div class="row-fluid show-grid">
                                                <div class="span4">
                                                    <label>学校
                                                        <input type="text" name="uSchool" id="uSchool" placeholder="现所在学校" /></label>	
                                                </div>
                                                <div class="span4">
                                                    <label>爸爸
                                                        <input type="text" name="uFather" id="uFather" /></label>	
                                                </div>
                                                <div class="span4">
                                                    <label>电话
                                                        <input type="text" name="uFathertel" id="uFathertel" placeholder="爸爸的联系方式" onkeyup="value=value.replace(/[^\d]/g,'')" /></label>	
                                                </div>
                                            </div>     
                                            <div class="row-fluid show-grid">
                                                <div class="span4">
                                                    <label>缴费
                                                        <input type="text" name="uPayfee" id="uPayfee" placeholder="实际缴费" onkeyup="value=value.replace(/[^\d]/g,'')" /></label>	
                                                </div>
                                                <div class="span4">
                                                    <label>妈妈
                                                        <input type="text" name="uMother" id="uMother"  /></label>	
                                                </div>
                                                <div class="span4">
                                                    <label>电话
                                                        <input type="text" name="uMothertel" id="uMothertel" placeholder="妈妈的联系方式" onkeyup="value=value.replace(/[^\d]/g,'')" /></label>	
                                                </div>
                                            </div>     
                                    </fieldset>
                                    <fieldset class="well the-fieldset">
                                        <legend class="the-legend">详细信息</legend>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>生日
                                                    <input type="text" name="uBirth" id="uBirth" placeholder="格式:xxxx-xx-xx" /></label>
                                            </div>
                                            <div class="span4">
                                                <label>性别
                                                    <input type="radio" name="uSex" value="1" checked />男&nbsp;&nbsp;<input type="radio" name="uSex" value="2" />女</label>	
                                            </div>
                                            <div class="span4">
                                                <label>年龄
                                                    <input type="text" name="uAge" id="uAge" onkeyup="value=value.replace(/[^\d]/g,'')" /></label>	
                                            </div>
                                            <div class="row-fluid show-grid">
                                                <div class="span4">
                                                    <label>籍贯
                                                        <input type="text" name="uWhere" id="uWhere"  /></label>
                                                </div>
                                                <div class="span4">
                                                    <label>渠道
                                                        <select name="uFrom" id="uFrom">
                                                            <option value="1">报纸</option>
                                                            <option value="2">网络搜索</option>
                                                            <option value="3">户外广告</option>
                                                            <option value="4">同学推荐</option>
                                                            <option value="5">内部介绍</option>
                                                        </select>
                                                    </label>	
                                                </div>
                                                <div class="span4">
                                                </div>
                                                <div class="span">
                                                </div>
                                                <div class="row-fluid show-grid">
                                                    <div class="span4">
                                                        <label>经手
                                                            <select name="tId" id="tId">
                                                                <option>--选择经手人--</option>
                                                                {loop="teacher"}
                                                                <option value="{$value.id}">{$value.nick}</option>
                                                                {/loop}
                                                            </select>
                                                        </label>
                                                    </div>
                                                    <div class="span4">
                                                        <label>备注<textarea name="uMemo"></textarea></label>
                                                    </div>			
                                                </div>
                                                <div class="span4">
                                                    <button type="submit" class="btn">确认保存</button>
                                                </div>
                                            </div>     
                                    </fieldset>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <!--tab-->
            </div>
        </div>

    </div>
</div>
<!--主体内容-->
<script>
    function validate(){
        var uName = $("#uName").val();	
        var uFather = $("#uFather").val();	
        var uFathertel = $("#uFathertel").val();	
        var uMother = $("#uMother").val();	
        var uMothertel = $("#uMothertel").val();	
        //手机 数字 11位 验证 及其他几项 必须是数字的验证
        var cId = $("#cId").val();	
        var uTotalfee = $("#uTotalfee").val();	
        var uSchool = $("#uSchool").val();	
        var uFrom = $("#uFrom").val();	
        var uSex = $("#uSex").val();	
        var uAge = $("#uAge").val();	
        var uBirth = $("#uBirth").val();	
        if(uName == '' || uFather == '' || uFathertel == '' || uMother == '' || uMothertel == '' || cId =='' || uTotalfee == '' || uFrom == '' || uSchool == '' || uFrom == '' || uSex == '' || uAge == '' || uBirth == ''){
            alert('学生信息不完整，请检查重新填！');
            return false;
        }
    }
</script>
<!--// footer //--> 
{include="../public/footer"}
